package com.gp.controller;

import com.gp.service.CarCommentService;
import com.gp.service.CarService;
import com.gp.util.CommonResult;
import com.gp.vo.CarCommentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("rent/carComment")
public class CarCommentController {

    @Autowired
    CarCommentService carCommentService;


    @PostMapping("findAll")
    public CommonResult findAll(Integer page, Integer limit, @RequestBody CarCommentVo commentVo){
        return carCommentService.findAll(page, limit, commentVo);
    }

    @DeleteMapping("delCarById")
    private CommonResult eleteByIdd(Integer id){
        return carCommentService.deleteById(id);
    }

}
